<?php
/**
 * Created by JetBrains PhpStorm.
 * User: GMC02
 * Date: 10/10/13
 * Time: 1:59 PM
 * To change this template use File | Settings | File Templates.
 */
return array(
    'urlFormat' => 'path',
    'showScriptName' => false,
    'rules' =>
        array(

            '/backend/' => '/backend.php/site/index',
            'backend.php/login' => '/backend.php/site/index',

            'tim-kiem' => 'site/search',
            'bo-chan' => 'site/unban',

            'cong-ty/<id:\d+>/<name:.*?>' => 'company/index',
            'cong-ty/<id:\d+>' => 'company/index',
            'cong-ty/tao-moi' => 'company/create',

            'cong-ty/chinh-sua/<id:\d+>/<name:.*?>' => 'editCompany/index',

            '/rao-vat/tao-moi' => 'advertise/create',

            'lien-he' => 'site/contact',

            'map/<zipcode:\d+>' => 'site/map',
            'map' => 'site/map',

            //region Base Routes
            '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
            //endregion
        ),

);
//            array('api/list', 'pattern' => 'api/<model:\w+>', 'verb' => 'GET'),
//            array('api/list/<model:\w+>', 'pattern' => 'api/list/<model:\w+>', 'verb' => 'GET'),
//
//            array('api/view', 'pattern' => 'api/<model:\w+>/<id:\d+>', 'verb' => 'GET'),
//            array('api/update', 'pattern' => 'api/<model:\w+>/<id:\d+>', 'verb' => 'PUT'),
//            array('api/delete', 'pattern' => 'api/<model:\w+>/<id:\d+>', 'verb' => 'DELETE'),
//            array('api/create', 'pattern' => 'api/<model:\w+>', 'verb' => 'POST'),